
<%@ page import="io.github.luyanfei.Quiz" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'quiz.label', default: 'Quiz')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-quiz" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="index"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-quiz" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list quiz">
			
				<g:if test="${quizInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="quiz.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${quizInstance}" field="name"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.createdBy}">
				<li class="fieldcontain">
					<span id="createdBy-label" class="property-label"><g:message code="quiz.createdBy.label" default="Created By" /></span>
					
						<span class="property-value" aria-labelledby="createdBy-label"><g:link controller="user" action="show" id="${quizInstance?.createdBy?.id}">${quizInstance?.createdBy?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.modifiedBy}">
				<li class="fieldcontain">
					<span id="modifiedBy-label" class="property-label"><g:message code="quiz.modifiedBy.label" default="Modified By" /></span>
					
						<span class="property-value" aria-labelledby="modifiedBy-label"><g:link controller="user" action="show" id="${quizInstance?.modifiedBy?.id}">${quizInstance?.modifiedBy?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.questions}">
				<li class="fieldcontain">
					<span id="questions-label" class="property-label"><g:message code="quiz.questions.label" default="Questions" /></span>
					
						<g:each in="${quizInstance.questions}" var="q">
						<span class="property-value" aria-labelledby="questions-label"><g:link controller="question" action="show" id="${q.id}">${q?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.quizAttempts}">
				<li class="fieldcontain">
					<span id="quizAttempts-label" class="property-label"><g:message code="quiz.quizAttempts.label" default="Quiz Attempts" /></span>
					
						<g:each in="${quizInstance.quizAttempts}" var="q">
						<span class="property-value" aria-labelledby="quizAttempts-label"><g:link controller="quizAttempt" action="show" id="${q.id}">${q?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.dateCreated}">
				<li class="fieldcontain">
					<span id="dateCreated-label" class="property-label"><g:message code="quiz.dateCreated.label" default="Date Created" /></span>
					
						<span class="property-value" aria-labelledby="dateCreated-label"><g:formatDate date="${quizInstance?.dateCreated}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.grade}">
				<li class="fieldcontain">
					<span id="grade-label" class="property-label"><g:message code="quiz.grade.label" default="Grade" /></span>
					
						<span class="property-value" aria-labelledby="grade-label"><g:fieldValue bean="${quizInstance}" field="grade"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.intro}">
				<li class="fieldcontain">
					<span id="intro-label" class="property-label"><g:message code="quiz.intro.label" default="Intro" /></span>
					
						<span class="property-value" aria-labelledby="intro-label"><g:fieldValue bean="${quizInstance}" field="intro"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.lastUpdated}">
				<li class="fieldcontain">
					<span id="lastUpdated-label" class="property-label"><g:message code="quiz.lastUpdated.label" default="Last Updated" /></span>
					
						<span class="property-value" aria-labelledby="lastUpdated-label"><g:formatDate date="${quizInstance?.lastUpdated}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.shuffleQuestions}">
				<li class="fieldcontain">
					<span id="shuffleQuestions-label" class="property-label"><g:message code="quiz.shuffleQuestions.label" default="Shuffle Questions" /></span>
					
						<span class="property-value" aria-labelledby="shuffleQuestions-label"><g:formatBoolean boolean="${quizInstance?.shuffleQuestions}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.sumGrades}">
				<li class="fieldcontain">
					<span id="sumGrades-label" class="property-label"><g:message code="quiz.sumGrades.label" default="Sum Grades" /></span>
					
						<span class="property-value" aria-labelledby="sumGrades-label"><g:fieldValue bean="${quizInstance}" field="sumGrades"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.timeClose}">
				<li class="fieldcontain">
					<span id="timeClose-label" class="property-label"><g:message code="quiz.timeClose.label" default="Time Close" /></span>
					
						<span class="property-value" aria-labelledby="timeClose-label"><g:formatDate date="${quizInstance?.timeClose}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.timeLimit}">
				<li class="fieldcontain">
					<span id="timeLimit-label" class="property-label"><g:message code="quiz.timeLimit.label" default="Time Limit" /></span>
					
						<span class="property-value" aria-labelledby="timeLimit-label"><g:fieldValue bean="${quizInstance}" field="timeLimit"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${quizInstance?.timeOpen}">
				<li class="fieldcontain">
					<span id="timeOpen-label" class="property-label"><g:message code="quiz.timeOpen.label" default="Time Open" /></span>
					
						<span class="property-value" aria-labelledby="timeOpen-label"><g:formatDate date="${quizInstance?.timeOpen}" /></span>
					
				</li>
				</g:if>
			
			</ol>
			<g:form url="[resource:quizInstance, action:'delete']" method="DELETE">
				<fieldset class="buttons">
					<g:link class="edit" action="edit" resource="${quizInstance}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
